import ins from "../utils/request";
export function list() {
    return ins.get('/shopping')
}

export function del(id) {
    return ins.delete('/shopping/' + id)
}

export function details(id) {
    return ins.get('/shopping/' + id)
}

export function add(obj) {
    return ins.post('/shopping', obj)
}

export function upData(id, obj) {
    return ins.patch('/shopping/' + id, obj)
}

export function search(obj) {
    const searchURL = new URLSearchParams(obj).toString()
    console.log(searchURL);
    return ins.get(`/shopping?${searchURL}`)
}